const sayHelloMixin = {
    data() {
        return {
            name: 'mixin',
            age: 18
        }
    },
    //生命周期的钩子函数会被合并到数组中，都会被调用；
    created() {
        this.sayHello()
        this.foo()
    },
    //最终methods对象会被合并成一个对象
    methods: {
        sayHello() {
            console.log("Hello Page Component");
        },
        foo() {
            console.log('mixin foo function');
        }
    }
}

export default sayHelloMixin